import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule, HttpClientJsonpModule} from '@angular/common/http';
import { HttpModule } from '@angular/http';
import { NgZorroAntdModule, NZ_I18N, zh_CN } from 'ng-zorro-antd';
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';
registerLocaleData(zh);
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { AuthService } from './services/auth.service';
import { OAuthModule } from 'angular-oauth2-oidc';
import { NeonService } from './services/neon/neon.service';
import { ModelListService } from './services/project/model/model-list.service';
import { MessageService } from './services/message.service';
import { LoginService } from './services/login/login.service';
import { PersonalService } from './services/project/personal/personal.service';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { InterceptorService } from './services/interceptor.service';
// import { ThrottleClickDirective } from './common/directive/throttleClick.directive';
// import { DebounceClickDirective } from './common/directive/DebounceClick';

import { RouteReuseStrategy } from '@angular/router';
import { AppRoutingCache } from './app-routing.cache';
// 进度模块添加
import { UpdateModelService } from './services/model/update-model.service';
import { BaseService } from './services/base.service';
import { ModelService } from './services/model/model.service';
import { GanttApi } from './services/gantt-chart/gantt.api';
import { ZzjAbpModule } from '@zzj/zzj-abp-web';
//

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpClientModule,
    HttpClientJsonpModule,
    HttpModule,
    BrowserAnimationsModule,
    NgZorroAntdModule,
    AppRoutingModule,
    ZzjAbpModule,
    OAuthModule.forRoot()
  ],
  providers: [
    /*路由缓存*/
    { provide: RouteReuseStrategy, useClass: AppRoutingCache },
    { provide: HTTP_INTERCEPTORS, useClass: InterceptorService, multi: true },
    { provide: NZ_I18N, useValue: zh_CN },
    AuthService,
    NeonService,
    ModelListService,
    MessageService,
    LoginService,
    PersonalService,
    UpdateModelService,
    BaseService,
    ModelService,
    GanttApi,
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
